import { Redirect } from 'umi'

export default (props:any) => {
  const isLogin  = true;
  console.log(isLogin,'isLogin')
  if (isLogin) {
    return <div>{ props.children }</div>;
  } else {
    return <Redirect to="/" />;
  }
}